package com.marvels.product.common.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.product.common.api.ProductHelloConsumerApi;
import com.marvels.product.productmanage.dto.QueryParameter;
import com.marvels.product.productmanage.service.impl.ProductTypeServiceImpl;

@RestController
@RequestMapping("/api/product")
public class HelloConsumerController {
	@Autowired
	ProductHelloConsumerApi helloConsumerApi;
	@Autowired
	private ProductTypeServiceImpl  productTypeServiceImpl;
	
    @RequestMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
    	System.out.println("call api..........");
//    	try{
//			String[] str = new String[]{"a"};
//			String s = str[2];
//			MarvelsLogUtil.getInstance().info("这是一个info级别日志");
//		}catch(Exception e){
//			MarvelsLogUtil.getInstance().warn("这是一个warn级别日志",e);
//			MarvelsLogUtil.getInstance().error("这是一个error级别日志",e);
//		}
        return helloConsumerApi.hello(name);
    }
    
    

}
